package com.tianzeculture.stagebao.activity.artist;

import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.tianzeculture.stagebao.R;
import com.tianzeculture.stagebao.base.BaseActivity;
import com.tianzeculture.stagebao.bean.PersonnelPoolBean;
import com.tianzeculture.stagebao.util.StatusBarUtil;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Administrator on 2018/8/12.
 */

public class ExperienceActivity extends BaseActivity {
    @BindView(R.id.tvTitle)
    TextView tvTitle;
    @BindView(R.id.tvRight)
    TextView tvRight;
    @BindView(R.id.et_experience)
    EditText etExperience;

    @Override
    protected int getLayoutResID() {
        return R.layout.activity_experience;
    }

    @Override
    public void initUI() {
        super.initUI();
        tvRight.setVisibility(View.VISIBLE);
        tvTitle.setText("工作经验");
        tvRight.setText("保存");
    }

    @OnClick(R.id.tvRight)
    public void saveExperience(View view) {
        String string = etExperience.getText().toString().trim();
        Intent intent = new Intent();
        intent.putExtra("experience", string);
        setResult(RESULT_OK, intent);
        PersonnelPoolBean bean = new PersonnelPoolBean();
        bean.setType(4);
        bean.setExperience(string);
        EventBus.getDefault().post(bean);
        finish();
    }
}
